A portion of the disclosure of this patent document contains material which is subject to copyright protection. The copyright owner has no objection to the facsimile reproduction by anyone of the patent document or the patent disclosure as it appears in the Patent and Trademark Office patent file or records, but otherwise reserves all copyright rights whatsoever.
The present invention pertains to electronic data processing, and more particularly concerns reducing the overhead associated with small databases, especially for computers having limited capacity.
Conventional relational databases such as Microsoft(copyright) Access and SQL Server are flexible and powerful. However, they are large programs, and they are optimized for large databases, concurrent access by multiple users, and ease of modifying data.
One of the consequences of this optimization is that the overhead of each database is relatively high, both in storage space and in performance. In particular, conventional databases must store a schema that is developed anew by the database program for each database. A relational database is made up of one or (usually) more tables. Each table is a set of records or rows having data in a defined set of columns. The data in each column is defined to be of a certain type, and may also have value restrictions, such as uniqueness or not null. Indexes can be defined on certain table columns. This information about the database is its schema. Database programs employ a data definition language whereby a user can define and modify the schema of a database. Because the data definition language (DDL) is typically the only facility for manipulating the schema of a database, a user (or, more likely, a database administrator) must create every new database essentially by hand. Again, for large databases having multiple users, this is not a problem.
Some existing relational databases management systems (DBMSs) provide a scripting tool for writing schemata outside the DDL, and application program interfaces (APIs) that a programmer can call directly. When a schema is placed into the database, the database allocates space in its file system for the user-defined schema. Such a database is self-contained, but it still has the storage and performance overhead of a schema defined by a DDL.
Some other applications only distantly related to databases, employ a description of a multicomponent object such as a document. The XML (Extended Markup Language) standard, an extension of the tag-based HTML (Hypertext Markup Language) can include a description of how the various components of a compound document are organized. This description, however, refers to multiple independent components, and does not describe an organization of a data file suitable for a database.
An increasing range of applications, however, could advantageously employ the power of the relational model for a large number of smaller databases, especially those normally accessed only by single users who mostly read the data, and write new data infrequently. For example, component libraries containing class and type definitions for programming systems need to be widely distributed, and seldom modify their data. As another example, address books in hand-held personal computers and similar applications are the antithesis of the databases for which relational databases are designed. These applications have many copies of similarly defined small, single-user, read-mostly databases.
Today, many such applications employ one-off database programs of very limited power and flexibility. Consequently, there is a need for processing large numbers of relatively small data bases without incurring either the storage and performance penalties of conventional relational database management systems or the limitations of individually written database programs.
The performance and storage overhead of relational databases increases greatly as the amount of data in the database decreases. The present invention increases performance and decreases storage requirements for small databases by providing simplified xe2x80x9cpluggable schemasxe2x80x9d for relational databases that are stored and accessed separately from the data in the database. A developer creates a representation of a standalone schema definition and installs only a reference to the schema in a database. The installation of the schema is performed by client code that compiles the representation into an application program for using the database. The client code passes a pointer to this compiled definition to a database engine. The engine then accesses this definition directly for providing full read/write access to the data in a particular instance of the database.